package com.audaque.springboot.foshanupload.web.webdemo.mapper;

import com.audaque.springboot.foshanupload.web.webdemo.mapper.anno.EnglishToGerman;
import com.audaque.springboot.foshanupload.web.webdemo.mapper.anno.TitleTranslator;
import com.audaque.springboot.foshanupload.web.webdemo.model.domain.GermanRelease;
import com.audaque.springboot.foshanupload.web.webdemo.model.domain.OriginalRelease;
import com.audaque.springboot.foshanupload.web.webdemo.mapper.covert.TypeCoverter2;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

//使用自定义类型转换器
@Mapper( uses = TypeCoverter2.class )
public interface MovieMapper {


    //带有自定义注解的使用类的方法
    @Mapping( target = "title", qualifiedBy = { TitleTranslator.class, EnglishToGerman.class } )
    @Mapping(target = "category", ignore =true)
    GermanRelease toGerman(OriginalRelease movies );



}
